package pile.pay.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.*;
import org.springframework.validation.annotation.Validated;
import pile.pay.entity.ResponseResult;
import pile.pay.params.recharge.RechargeDTO;
import pile.pay.service.IRechargeService;
import org.springframework.beans.factory.annotation.Autowired;
import pile.pay.entity.Recharge;

import pile.pay.params.recharge.DeleDTO;
import pile.pay.params.recharge.ListDTO;

import javax.servlet.http.HttpServletRequest;

/**
 * <p>
 * 用户充值表 前端控制器
 * </p>
 *
 * @author 郭天义
 * @since 2024-06-28
 */
@RestController
@RequestMapping("/recharge")
public class RechargeController {

   @Autowired
   private IRechargeService rechargeService;

   /**
    * 充值 新的充值接口 返回一个对象
    * @param rechargeDTO
    * @return
    */
   @PostMapping("/rechargeNew")

   public ResponseResult<Recharge> rechargeNew(@Validated @RequestBody RechargeDTO rechargeDTO) {


      return rechargeService.rechargeNew( rechargeDTO);
   }


}
